
#ifndef SocketCommunication_H_
#define SocketCommunication_H_



typedef struct {
	char tipo_senial[5]; //mov
	char identificador[6]; //jug1
	char senial[5];//izq
	char x[5];
	char y[5];
}envio;

class SocketCommunication
{
private:
  struct sockaddr_in * ClientData;
public:
  int ID;
  int STATE;
  //TODO crear otro constructor po hostname.
  SocketCommunication(unsigned short int, char *);
  //SocketCommunication(int ,struct sockaddr_in *);
  SocketCommunication();
  int SendBloq(char *,int dataSize);
  int SendBloq(envio *,int dataSize);
  int ReceiveBloq(envio *,int bufferSize);

  int ReceiveBloq(char *,int bufferSize);

  char * GetClientIP();
  unsigned short int GetClientPort();
  virtual
  ~SocketCommunication ();
};

#endif /* SocketCommunication_H_ */

